package com.mutouren.modules.ca.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.mutouren.common.orm.spring.BaseDao;
import com.mutouren.modules.ca.model.User;

public interface UserDao extends BaseDao<User> {
	
	User getByIdentity(User user); // userName, email, mobile	
	List<User> getByIdentityForRegister(User user);
	int modifyPassword(@Param("userId")Long userId, @Param("password")String password);
	
//	int updateEmail(@Param("userId")Long userId, @Param("email")String email);
//	int updateMobile(@Param("userId")Long userId, @Param("mobile")String mobile);
	
	int verifyEmail(@Param("userId")Long userId, @Param("email")String email, @Param("isOk")boolean isOk);
	int verifyMobile(@Param("userId")Long userId, @Param("mobile")String mobile, @Param("isOk")boolean isOk);
	int approve(@Param("userId")Long userId, @Param("isOk")boolean isOk);

	int updateLastLoginTime(Long userId);
	
}
